import request from '@/utils/request'

// 查询子基金账号列表
export function listBfAccount(query) {
  return request({
    url: '/bf/bfAccount/list',
    method: 'get',
    params: query
  })
}

// 查询子基金账号详细
export function getBfAccount(id) {
  return request({
    url: '/bf/bfAccount/' + id,
    method: 'get'
  })
}

// 保存子基金填报账号
export function saveBfAccount(data) {
  return request({
    url: '/bf/bfAccount/save',
    method: 'post',
    data: data
  })
}

// 注销账户
export function delBfAccount(id) {
  return request({
    url: '/bfPortal/login/delBfAccount/' + id,
    method: 'get'
  })
}

// 校验账号是否存在
export function verifyThatTheAccountExists(userName) {
  return request({
    url: '/bfPortal/login/verifyThatTheAccountExists/' + userName,
    method: 'get'
  })
}

// 根据companyId获取对象
export function getByGpId(bfId) {
  return request({
    url: '/bfPortal/login/getByGpId/' + bfId,
    method: 'get'
  })
}

// 新增开通用户
export function saveAccountUser(data) {
  return request({
    url: '/bfPortal/login/saveBfAccount',
    method: 'post',
    data: data
  })
}
